#!/usr/bin/python3
import os
import glob

def delete_files_with_extensions(directory, extensions):
    for root, dirs, files in os.walk(directory):
        for file in files:
            if any(file.endswith(ext) for ext in extensions):
                os.remove(os.path.join(root, file))
                print(f"Deleted: {os.path.join(root, file)}")

if __name__ == "__main__":
    current_directory = '.'  # 当前目录
    extensions_to_delete = ['.symvers', '.mod', '.o', '.mod.c', '.order','.out','.cmd']
    delete_files_with_extensions(current_directory, extensions_to_delete)
